<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <ul>
      <li 
        v-for="el in json"
        :key="el"
        >
        {{ el }}
      </li>
    </ul>
    <hr>
    <ul>
      <li v-for="(el, key, index) in json" :key="index">
       {{key}} ==> {{index}} ==> {{ el }}
      </li>
    </ul>
  </div>
  <script src="./vue.js"></script>
  <script>
    const vm = new Vue({
      el: '#app',
      data: {
        json: {
          a: '秃驴',
          b: '猴子',
          c: '猪',
          d: '河妖'
        }
      },
      methods: {
        del (i) {
          if (confirm('确认删除吗')) {
            this.arr.splice(i, 1)
          }
        }
      }
    })
  </script>
</body>
</html>
